import { Ref } from 'vue'
import {
  RadioGroupProps,
  CheckboxGroupProps,
  CheckboxProps,
  SelectProps,
  RadioButtonProps,
  SelectOption,
  SwitchProps,
  InputProps,
  DatePickerProps,
  TreeSelectProps,
  TreeSelectOption,
} from 'naive-ui'
import { Value as SelectValue } from 'naive-ui/lib/select/src/interface'
export interface CreateRadioParams {
  refState: Ref<string | number | null | undefined>
  radioOptions: (RadioButtonProps & { label: string })[]
  radioPropsOptions: RadioGroupProps
}

export interface CreateCheckboxParams {
  refState: Ref<string | number | null | undefined>
  checkboxOptions: CheckboxProps[]
  checkboxPropsOptions: CheckboxGroupProps
}

export interface CreateSelectParams {
  refState: Ref<SelectValue>
  selectOptions: SelectOption[]
  selectpropsOptions: SelectProps
}

export interface CreateTreeSelectParams {
  refState: Ref<SelectValue>
  treeSelectOptions: TreeSelectOption[]
  treeSelectPropsOptions: TreeSelectProps
}

export interface CreatedSwitchParams {
  refState: Ref<boolean>
  switchOptions: SwitchProps
}

export interface CreatedInputParams {
  refState: Ref<string>
  inputPropsOptions: InputProps
}

export interface CreateAictions {
  label: string
  type: 'default' | 'warning' | 'primary' | 'success' | 'error' | 'info'
  disabled: Ref<boolean>
  onClick: (item: CreateAictions) => void
}

export interface Table<T> {
  dataList: Ref<any[]>
  tableHeight: Ref<number>
  bordered: Ref<boolean>
  tableLoading: Ref<boolean>
}

export interface useCreateDatePicker {
  datePickerPropsOptions: DatePickerProps
  refState: Ref<string>
}
